package com.example.demo.mapper;

import com.example.demo.entity.preinspectionmanage;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface preinspectionmanageMapper {
    @Insert("insert into view_preinspectionmanage(tname,pname,tcontent,ttype,tdate,remark) " +
            "value(#{tname},#{pname},#{tcontent},#{ttype},#{tdate},#{remark})")
    public int insert(preinspectionmanage preinspectionmanage);

    @Select("select * from view_preinspectionmanage ")
    public List<preinspectionmanage> query();

    @Update("update view_preinspectionmanage set tname=#{tname},pname=#{pname}," +
            "tcontent=#{tcontent},ttype=#{ttype}," +
            "tdate=#{tdate},remark=#{remark} " +
            "where pkey=#{pkey}")
    public int update(preinspectionmanage preinspectionmanage);
}
